package com.ruoyi.user.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.pojo.request.PageSearchParam;
import com.ruoyi.common.core.pojo.result.Pages;
import com.ruoyi.system.api.model.user.AppUserChum;
import com.ruoyi.user.model.pojo.entity.UserChum;
import com.ruoyi.user.model.pojo.entity.UserChumApply;
import com.ruoyi.user.model.pojo.request.app.AppUserChumApplyRequest;
import com.ruoyi.user.model.pojo.request.app.AppUserChumCheckRequest;
import com.ruoyi.user.model.pojo.request.app.AppUserChumCreateRequest;
import com.ruoyi.user.model.pojo.request.app.AppUserChumSearchRequest;
import com.ruoyi.user.model.pojo.result.app.AppUserChumInfoResult;

import java.util.List;


public interface IUserChumService extends IService<UserChum> {

    /**
     * 开通密友位置
     */
    boolean openChum(AppUserChumCreateRequest request, Long userId);

    /**
     * 增加用户密友位置
     */
    boolean openUserChum(Long userId, Long chumId, String chumName, String chumColor);

    /**
     * 获取用户的密友关系列表
     */
    List<UserChum> getUserChumList(Long userId, Long aimUserId);


    /**
     *  内部调用获取
     */
    AppUserChum info(Long id);

    /**
     * 用户申请密友
     */
    boolean apply(AppUserChumApplyRequest request, Long userId);

    /**
     * 校验
     */
    UserChum verify(Long id);


    /**
     * 密友申请列表
     */
    Pages<UserChumApply> applyListPage(PageSearchParam pageSearchParam, Long userId);


    /**
     * 审核密友申请
     * @param request
     * @param userId
     * @return
     */
    boolean check(AppUserChumCheckRequest request, Long userId);

    /**
     * 查看他人/自己的密友列表
     */
    Pages<AppUserChumInfoResult> listPage(AppUserChumSearchRequest request);


    /**
     * 密友详情
     */
    AppUserChumInfoResult infoById(Long id);

    /**
     *
     */
    boolean removeChum(AppUserChumApplyRequest request, Long userId);

    /**
     * 设置密友位置
     * @param id
     * @param aimUserId
     * @return
     */
    boolean setChum(Long id, Long aimUserId);
}
